package com.inifitness.common.constants;

import java.time.format.DateTimeFormatter;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

/**
 * 全局常量
 *
 * @author sunjinfeng
 * @since 2023-12-01
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class GlobalConstants {

  /**
   * 全局状态-是
   */
  public static final Integer STATUS_YES = 1;
  public static final Long MANAGE_TENANT_ID = 0L;

  /**
   * 超级管理员角色编码
   */
  public static final String ROOT_ROLE_CODE = "ROOT";

  /**
   * [ {接口路径:[角色编码]},...]
   */
  public static final String URL_PERM_ROLES_KEY = "permission:url";

  /**
   * [{按钮权限标识:[角色编码]},...]
   */
  public static final String BTN_PERM_ROLES_KEY = "permission:btn";
  public static final String SYSTEM_TENANT_ID = "tenant_id";

  public static final String HTTP = "http";
  public static final String HTTPS = "https";

  public static final int DEFAULT_RESUBMIT_INTERVAL = 5;

  public static final String BEARER_TOKEN_TYPE = "Bearer";
  public static final int BEARER_TOKEN_LENGTH = 7;

  public static final int VALUE_1000 = 1000;
  public static final int VALUE_1024 = 1024;

  public static final DateTimeFormatter SHORT_DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMdd");
}
